<?php


namespace app\index\model;


use think\Model;

class User extends Model
{
    public function getUserByMobile($mobile){

        if (empty($mobile)){
            return [];
        }
//        $data = self::where()
//        dump($data);

        $data = self::where('mobile',$mobile)->find();
        if ($data){
            $data= $data->toArray();
        }
        return $data;

    }
}